{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">

					<!--<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加订单</a></li>-->
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 资金流水</a></li>
					<!--<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑订单</a></li>-->

				</ul>
				<div class="inner-container">
					<form class="form-inline search-form" role="form" id="J_List_Form>
						<input type="hidden" name="pagesize" value="{$pagesize}" >
						<!-- search form start -->
						<!--tmpl-search-->

						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									流水号
								</div>
								<input type="text" class="form-control input-sm" maxlength="28" placeholder="" name="serial_no" value="{$serial_no}">
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									大塑账户
								</div>
								<input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="" name="username" value="{$username}">
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									订单号
								</div>
								<input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="" name="order_no" value="{$order_no}">
							</div>
						</div>

						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<select class="form-control" name="type">
									<option value="">-业务类型-</option>
									<option value="pay" {if $type=='pay'}selected{/if}>支付</option>
									<option value="confirm" {if $type=='confirm'}selected{/if}>确认收货</option>
									<option value="inpay" {if $type=='inpay'}selected{/if}>入金</option>
									<option value="outpay" {if $type=='outpay'}selected{/if}>出金</option>
								</select>
							</div>
						</div>
						
						<!-- searchdatetime -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									交易时间
								</div>
								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
								name="s_time" value="{$s_time}"
								placeholder="开始时间" />
						
								<div class="input-group-addon">
									-
								</div>
								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
								name="e_time" value="{$e_time}"
								placeholder="结束时间" />
							</div>
						</div>
						
						

						<input type="hidden" name="order" value="{$order}">
						<input type="hidden" name="pagesize" value="{$pagesize}">
						<button type="submit" class="btn btn-sm btn-success">搜索</button>
						{run exportBtn()}
						<!-- search form end -->
					<!--</form>
					<form id="J_List_Form">-->
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20"><input type="checkbox" class="icheck check-all" /></th>
										<th>流水号</th>
										<!--<th>租户标识</th>-->
										<th>大塑账户</th>
										<th>发生额(￥)</th>
										<th>可用资金(￥)</th>
										<th>资金类型</th>
										<th>业务类型</th>
										<th>具体业务</th>
										<th>交易时间</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="14" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $v}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" value="{$v[id]}"/></td>
									<!--tmpl-fieldlist-->
								
									<td>{$v[serial_no]}</td>
									<!--<td>{$v[mpe_name]}</td>-->
									<td>{$v[username]}</td>
									<td>{$v[amount]}</td>
									<td>{$v[usable]}</td>
									<td>
										{if $v[atype] == '+'}
										<span class="label label-success">收入</span>
										{elseif $v[atype] == '-'}
										<span class="label label-danger">支出</span>
										{else}
										---
										{/if}
									</td>
									<td>{$v[type_name]}</td>
									<td>{if $v[type]=='pay' || $v[type]=='confirm'}订单号：{$v[order_no]}{else}-{/if}</td>
									<td>{$v[addtime]}</td>
								</tr>
								{/loop}
								

							</table>

						</div>
						
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>

				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->


<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/trading_orderindex",function (exports){
		exports.init({
			billRecordsUrl : '/admin/order/billRecords',//获取资金流水
			confirmOrderPayUrl : '/admin/order/confirmOrderPay',//确认收款
			addShippingUrl : '/admin/order/delivery',//确认收款
		});
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}

		<li {[if curr == page]}class="active"{[/if]}><a class="assoc-page" data-page="{[page]}"  href="javascript:void(0)">{[page]}</a></li> 

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>
</body>
</html>
